package com.yike.user.controller;

import com.yike.user.entity.OpenDoorRecord;
import com.yike.user.service.OpenDoorRecordService;
import com.yike.user.vo.OpenDoorRecordVo;
import lombok.extern.slf4j.Slf4j;
import com.yike.user.param.OpenDoorRecordPageParam;
import com.yike.common.base.BaseController;
import com.yike.common.api.ApiResult;
import com.yike.common.pagination.Paging;
import com.yike.common.api.IdParam;
import com.yike.common.log.Module;
import com.yike.common.log.OperationLog;
import com.yike.common.enums.OperationLogType;
import com.yike.common.api.Add;
import com.yike.common.api.Update;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 店铺开门记录表 控制器
 *
 * @author Sakura
 * @since 2024-09-04
 */
@Slf4j
@RestController
@RequestMapping("/openDoorRecord")
@Module("user")
@Api(value = "店铺开门记录API", tags = {"店铺开门记录"})
public class OpenDoorRecordController extends BaseController {

    @Autowired
    private OpenDoorRecordService openDoorRecordService;

    /**
     * 店铺开门记录表分页列表
     */
    @PostMapping("/getPageList")
    //@OperationLog(name = "店铺开门记录表分页列表", type = OperationLogType.PAGE)
    @ApiOperation(value = "店铺开门记录表分页列表", response = OpenDoorRecordVo.class)
    public ApiResult<Paging<OpenDoorRecordVo>> getOpenDoorRecordPageList(@Validated @RequestBody OpenDoorRecordPageParam openDoorRecordPageParam) throws Exception {
        Paging<OpenDoorRecordVo> paging = openDoorRecordService.getOpenDoorRecordPageList(openDoorRecordPageParam);
        return ApiResult.ok(paging);
    }

}

